<template>
  <div class="container">
    <ul>
      <li v-for="(item, index) in goodsList" :key="index">
        <img :src="item.list_pic_url" alt="" width="100%" />
        <div class="name">{{ item.name }}</div>
        <div class="price">{{ item.retail_price | RMBformat }}</div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ["goodsList"],
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style scoped lang="less">
ul {
  padding: 0.1rem 2%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  li {
    width: 49%;
    background-color: #fff;
    text-align: center;
    margin-bottom: 0.1rem;
    line-height: 0.3rem;
  
    .name {
        margin-bottom: .10rem;
      font-size: .1rem;
      font-weight: bolder;
      line-height: .12rem;
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .price {
        margin-bottom: 0.1rem;
      font-size: 0.16rem;
      line-height:.18rem;
      color: darkred;
    }
  }
}
</style>
